Skip to content

Instantly share code, notes, and snippets.

@TheNathannator
TheNathannator / GIP Interface Writeup.md
Last active November 10, 2026 09:12
A writeup on how to interact with the Xbox One driver on Windows directly

GIP Interface

A writeup on how to directly communicate with GIP (Xbox One) devices on a basic level.

I tried Windows.Gaming.Input.Custom and was unable to get it to work, so I resorted to this. Would have liked if I could do things more legitimately with what little documentation was provided, but oh well.

This writeup is not at all comprehensive of every possibilty with the interface, otherwise there'd be far too much to go through.

Thanks to the XInputHooker project for having a bunch of function detours set up, made my life easier when doing all of this.

@aspose-com-gists
aspose-com-gists / Aspose.SVG for .NET – How to Convert SVG Files
Last active November 10, 2026 09:11
This Gist contains C# examples Aspose.SVG for .NET – Convert SVG Files
Aspose.SVG for .NET – How to Convert SVG Files
@mayufo
mayufo / 验证中国身份证 前6位对应地区码
Created January 16, 2018 10:12
验证中国身份证 前6位对应地区码
var GB2260 = {
"110000": "北京市",
"110100": "北京市市辖区",
"110101": "北京市东城区",
"110102": "北京市西城区",
"110103": "北京市崇文区",
"110104": "北京市宣武区",
"110105": "北京市朝阳区",
"110106": "北京市丰台区",
"110107": "北京市石景山区",
@paulirish
paulirish / what-forces-layout.md
Last active November 10, 2026 09:10
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@cgbarlow
cgbarlow / mitko_insights.md
Last active November 10, 2026 09:10
Mitko Vasilev's hands-on insights for running local AI on AMD Strix Halo (Z2) and NVIDIA DGX Spark / ZGX GB10. Reorganised from his LinkedIn posts into a topic-driven playbook covering the dual-model agentic pattern on Strix Halo, APEX per-expert quantisation, TurboQuant KV-cache compression, the ZGX vs Strix Halo trade-off (kernels vs agents), …

Mitko Vasilev's Local AI Playbook

A Practical Guide for AMD Strix Halo and NVIDIA GB10 (DGX Spark) Owners

Distilled from Mitko Vasilev's (LinkedIn @ownyourai) hands-on documentation across the two architectures that dominate the 128GB unified-memory desktop AI category.


1. The Core Philosophy

"Make sure you own your AI. AI in the cloud is not aligned with you; it's aligned with the company that owns it."

@mavieth
mavieth / media-query-template.css
Last active November 10, 2026 09:08
Media Query Template for Basic CSS
/**
* Basic CSS Media Query Template
* TODO: I should probably use Sass...
* Author: Michael Vieth
* ------------------------------------------
* Responsive Grid Media Queries - 1280, 1024, 768, 480
* 1280-1024 - desktop (default grid)
* 1024-768 - tablet landscape
* 768-480 - tablet
* 480-less - phone landscape & smaller

1. นาฬิกากลไก — เลื่อนหน้าจอแล้วชิ้นส่วนกระจายออก (Scroll-driven)

Build an immersive single-page 3D website showcasing a luxury mechanical wristwatch that disassembles as the user scrolls.

Tech: Three.js (or React Three Fiber) + GSAP ScrollTrigger + Lenis smooth scroll.

Experience:

  • Hero: the fully assembled watch rotates slowly under a soft studio spotlight on a deep black background, with subtle reflections on sapphire glass and polished steel.
  • As the user scrolls, the watch explodes along its vertical axis layer by layer: strap → case back → rotor → movement plate → gear train → balance wheel → mainspring barrel → dial → hands → crystal.
  • Each scroll section pauses on one component; the camera dollies in to a macro close-up while a minimal text panel fades in (name, function, one technical spec).
  • Gears keep ticking and rotating in real time even while separated.

These are simplified examples I came up with to go along with William Woodruff's excellent blog post on x86-64 addressing modes.

All the examples are compiled with GCC -O3 or -Os, which is indicative of what the compiler thinks the best option is in practice.

Base + Index

Use case: Indexing into a byte array (whose address is not fixed)

char f(char buf[], int index)
@vil
vil / why_grapheneos.md
Last active November 10, 2026 09:02
Why GrapheneOS is the most secure Android OS

Why GrapheneOS Is the Most Secure Android OS

GrapheneOS is a security- and privacy-focused mobile operating system built on Android. It runs on Google Pixel hardware and reinforces Android’s security model at every level. As the developers explain, GrapheneOS "starts from the strong baseline of the Android Open Source Project (AOSP) and takes great care to avoid increasing attack surface or hurting the strong security model." In practice, this means every feature is scrutinized for risk: unused hardware is disabled by default, new capabilities are opt-in, and aggressive exploit mitigations are added throughout the OS. The result is an Android variant that sacrifices little usability, but greatly strengthens defenses against both targeted and automated attacks.